package com.yigo.prc.api.category;

import com.yigo.framework.http.Q;
import com.yigo.framework.http.R;
import com.yigo.prc.api.category.command.CreateCategoryCmd;
import com.yigo.prc.api.category.resp.CategoryTreeResp;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.*;

/**
 * @author chenzl
 */
public interface PrcCategoryFeign {

    @PostMapping("prc/category/createCategory")
    R createCategory(@RequestBody @Valid Q<CreateCategoryCmd> q);

    /**
     * @return
     */
    @PostMapping("prc/category/queryCategoryTree")
    R<List<CategoryTreeResp>> queryCategoryTree(@RequestBody @Valid Q q);
}
